import request from '@/utils/request'

// 获取学科列表
export function getList(params) {
  return request({
    url: '/subjects',
    method: 'GET',
    params
  })
}
// 新增
export function addSubject(data) {
  return request({
    url:'/subjects',
    method: 'POST',
    data
  })
}
// 根据id数据回填
export function detailSubject(id) {
  return request({
    url:`/subjects/${id}`,
    method: 'GET',
  })
}
// 修改
export function updateSubject(data) {
  return request({
    url:`/subjects/${data.id}`,
    method: 'PUT',
    data
  })
}
export function delSubject(id) {
  return request({
    url:`/subjects/${id}`,
    method:'DELETE',
  })
}
export function simpleSubject() {
  return request({
    url:'/subjects/simple',
    method:'GET',
  })
}
